home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / k3binffilewriter.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-05-27  |  3.0 KB  |  120 lines

  1. /* 
  2.  *
  3.  * $Id: k3binffilewriter.h 619556 2007-01-03 17:38:12Z trueg $
  4.  * Copyright (C) 2003 Sebastian Trueg <trueg@k3b.org>
  5.  *
  6.  * This file is part of the K3b project.
  7.  * Copyright (C) 1998-2007 Sebastian Trueg <trueg@k3b.org>
  8.  *
  9.  * This program is free software; you can redistribute it and/or modify
  10.  * it under the terms of the GNU General Public License as published by
  11.  * the Free Software Foundation; either version 2 of the License, or
  12.  * (at your option) any later version.
  13.  * See the file "COPYING" for the exact licensing terms.
  14.  */
  15.  
  16. #ifndef _K3B_INF_FILE_WRITER_H_
  17. #define _K3B_INF_FILE_WRITER_H_
  18.  
  19. #include <qvaluevector.h>
  20. #include <qtextstream.h>
  21.  
  22. #include <k3bmsf.h>
  23.  
  24.  
  25. namespace K3bDevice {
  26.   class Track;
  27.   class TrackCdText;
  28.   class CdText;
  29. }
  30.  
  31.  
  32. class K3bInfFileWriter
  33. {
  34.  public:
  35.   K3bInfFileWriter();
  36.  
  37.   bool save( QTextStream& );
  38.   bool save( const QString& filename );
  39.  
  40.   /**
  41.    * Use this to set:
  42.    * @li trackStart
  43.    * @li trackLength
  44.    * @li index0
  45.    * @li all indices
  46.    * @li preemphasis
  47.    * @li copyPermitted
  48.    * @li ISRC
  49.    *
  50.    * Endianess is set to big.
  51.    *
  52.    * Tracknumber needs to be set manually.
  53.    */
  54.   void setTrack( const K3bDevice::Track& );
  55.  
  56.   void clearIndices() { m_indices.clear(); }
  57.  
  58.   /**
  59.    * This is relative to the track start
  60.    */
  61.   void setIndex0( int i ) { m_index0 = i; }
  62.   void addIndex( long i );
  63.  
  64.   void setTrackNumber( int i ) { m_trackNumber = i; }
  65.  
  66.   void setTrackStart( const K3b::Msf& i ) { m_trackStart = i; }
  67.   void setTrackLength( const K3b::Msf& i ) { m_trackLength = i; }
  68.  
  69.   void setPreEmphasis( bool b ) { m_preEmphasis = b; }
  70.   void setCopyPermitted( bool b ) { m_copyPermitted = b; }
  71.  
  72.   /**
  73.    * Cdrecord seems to ignore this anyway and always expect big endian
  74.    * data on stdin and wavs are little endian anyway.
  75.    */
  76.   void setBigEndian( bool b ) { m_bigEndian = b; }
  77.  
  78.   void setTrackCdText( const K3bDevice::TrackCdText& );
  79.   void setTrackTitle( const QString& s ) { m_trackTitle = s; }
  80.   void setTrackPerformer( const QString& s ) { m_trackPerformer = s; }
  81.   void setTrackSongwriter( const QString& s ) { m_trackSongwriter = s; }
  82.   void setTrackComposer( const QString& s ) { m_trackComposer = s; }
  83.   void setTrackArranger( const QString& s ) { m_trackArranger = s; }
  84.   void setTrackMessage( const QString& s ) { m_trackMessage = s; }
  85.  
  86.   void setCdText( const K3bDevice::CdText& );
  87.   void setAlbumTitle( const QString& s ) { m_albumTitle = s; }
  88.   void setAlbumPerformer( const QString& s ) { m_albumPerformer = s; }
  89.  
  90.   void setIsrc( const QCString& s ) { m_isrc = s; }
  91.   void setMcn( const QCString& s ) { m_mcn = s; }
  92.  
  93.  private:
  94.   long m_index0;
  95.  
  96.   QValueVector<long> m_indices;
  97.  
  98.   int m_trackNumber;
  99.   K3b::Msf m_trackStart;
  100.   K3b::Msf m_trackLength;
  101.   bool m_preEmphasis;
  102.   bool m_copyPermitted;
  103.   bool m_bigEndian;
  104.  
  105.   QString m_trackTitle;
  106.   QString m_trackPerformer;
  107.   QString m_trackSongwriter;
  108.   QString m_trackComposer;
  109.   QString m_trackArranger;
  110.   QString m_trackMessage;
  111.  
  112.   QString m_albumTitle;
  113.   QString m_albumPerformer;
  114.  
  115.   QCString m_isrc;
  116.   QCString m_mcn;
  117. };
  118.  
  119. #endif
  120.